package com.company.project.modular.system.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.company.project.modular.system.model.Instock;
import com.company.project.modular.system.model.Use;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lsf
 * @since 2018-11-08
 */
public interface InstockMapper extends BaseMapper<Instock> {

    List<String> findByFrequency(@Param("standardCode") String standardCode);

    List<String> findByInFrequency(@Param("standardCode") String standardCode);

    List<String> findByNumber(@Param("standardFrequency") int standardFrequency);

    List<String> findByOutFrequency(@Param("standardCode") String standardCode);

    List<Map<String,Object>> instockNumber0(@Param("condition") String condition);

    List<Map<String,Object>> list(@Param("condition") String condition);

    /*根据标识码去获取库存表最大的总出入库次数*/
    List<String> findByMaxF(String standCode);

    /*根据标识码和总出入库次数去获取库存表剩余量*/
    List<String> findByStandardNumber(@Param("standardCode") String standardCode, @Param("maxTime") String maxTime);

    List<Instock> selectByAll(@Param("useCode") String useCode);
}
